// @ts-ignore
/* eslint-disable */
import request from '@/utils/request.ts'

/** 此处后端没有提供注释 POST /admin/login */
export async function adminLogin(body: API.SysUser, options?: { [key: string]: any }) {
  return request<API.BaseResponseLoginResultDTO>('/admin/login', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 POST /logout */
export async function logout(options?: { [key: string]: any }) {
  return request<API.BaseResponseString>('/logout', {
    method: 'POST',
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 POST /register */
export async function register(body: API.SysUser, options?: { [key: string]: any }) {
  return request<API.BaseResponseString>('/register', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 POST /user/login */
export async function userLogin(body: API.SysUser, options?: { [key: string]: any }) {
  return request<API.BaseResponseLoginResultDTO>('/user/login', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}
